# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=py3-zict
pkgver=3.0.0
pkgrel=0
pkgdesc="Mutable mapping tools"
url="http://zict.readthedocs.io/en/latest/"
arch="noarch"
license="BSD-3-Clause"
depends="
	py3-heapdict
	py3-lmdb
	"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
checkdepends="
	py3-pytest
	py3-pytest-asyncio
	py3-pytest-repeat
	py3-pytest-timeout
	"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/dask/zict/archive/refs/tags/$pkgver.tar.gz"
builddir="$srcdir/zict-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
f79591ddea21fdbecc542f65d91d2734fcb8b77d385da29d3c68b7a6984fd15ff8eb5311e16945cfe47042f6216917ebeedb103aeeec9d987c71fefc77deb00b  py3-zict-3.0.0.tar.gz
"
